<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-html和v-text</title>
  </head>

  <body>
    <div id="app">
      <h2>{{msg}}</h2>
      <h2 v-text="msg"></h2>
      {{url}}
      <h2 v-html="url"></h2>
    </div>
  </body>
  <script src="../js/vue.js"></script>
  <script>
    new Vue({
      el: "#app",
      data() {
        return {
          msg: "我要去学习",
          url: "<a href='http://www.163.com'>去网易</a>"
        }
      }
    })
  </script>

</html>